<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="java.util.*"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@page import="java.util.*, model.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<HEAD>
<TITLE>Sign in, Please!</TITLE>
</HEAD>
<BODY>

	<html:errors />

		<% 
			Applicant applicant = (Applicant)session.getAttribute("applicant");
			Vector<String> countriesVector = (Vector)session.getAttribute("countriesVector");
		%>
		
		<%="Name: " + applicant.getName() %><br />
		
		<hr /><br /> Enter where you have citizenship! <br /><br />
		
		<table>
			<tr>
				<td>
					<% 	int count = countriesVector.size();
						for(int i=0; i<count/3 + 1; i++){
		 					out.println("<a href=\"/StrutsCSE135/pages/students/residence.jsp?country=" + countriesVector.get(i) + "\">" + countriesVector.get(i) + "</a>");
		 		      		out.println("<br />");
		 				} %>
				</td>
				<td>
					<% for(int i=count/3 + 1; i < (count/3)*2 + 1; i++){ 
		 					out.println("<a href=\"/StrutsCSE135/pages/students/residence.jsp?country=" + countriesVector.get(i) + "\">" + countriesVector.get(i) + "</a>");
		 		      		out.println("<br />");
		 				} %>
				</td>
				<td>
					<% 	for(int i = (count/3)*2 + 1; i<count; i++){ 
		 					out.println("<a href=\"/StrutsCSE135/pages/students/residence.jsp?country=" + countriesVector.get(i) + "\">" + countriesVector.get(i) + "</a>");
		 		      		out.println("<br />");
		 				} %>
				</td>
			</tr>
		</table>
		
		
</BODY>
</html:html>